package com.snopy.designPattern.structure.flyweight;

import java.awt.*;

/**
 * @author snopy
 * @version 1.0.0
 * @classname Tree
 * @description
 * @email 77912204@qq.com
 * @date 2022/11/26 23:58
 */
public class Tree {
    private int x;
    private int y;
    private TreeType type;

    public Tree(int x, int y, TreeType type) {
        this.x = x;
        this.y = y;
        this.type = type;
    }

    public void draw(Graphics g){
        type.draw( g, x, y);
    }

}
